package com.zlq.cn.util;

public class LocationUtils {
    /**
     * 计算两个经纬度之间的距离 单位：米
     */
    public static float calculateLineDistance(double longitude1, double latitude1, double longitude2, double latitude2) {
        try {
            double var2 = 0.01745329251994329D;
//            double var4 = var0.getLongitude();
//            double var6 = var0.getLatitude();
//            double var8 = var1.getLongitude();
//            double var10 = var1.getLatitude();
            longitude1 *= var2;
            latitude1 *= var2;
            longitude2 *= var2;
            latitude2 *= var2;
            double var12 = Math.sin(longitude1);
            double var14 = Math.sin(latitude1);
            double var16 = Math.cos(longitude1);
            double var18 = Math.cos(latitude1);
            double var20 = Math.sin(longitude2);
            double var22 = Math.sin(latitude2);
            double var24 = Math.cos(longitude2);
            double var26 = Math.cos(latitude2);
            double[] var28 = new double[3];
            double[] var29 = new double[3];
            var28[0] = var18 * var16;
            var28[1] = var18 * var12;
            var28[2] = var14;
            var29[0] = var26 * var24;
            var29[1] = var26 * var20;
            var29[2] = var22;
            double var30 = Math.sqrt((var28[0] - var29[0]) * (var28[0] - var29[0]) + (var28[1] - var29[1]) * (var28[1] - var29[1]) + (var28[2] - var29[2]) * (var28[2] - var29[2]));
            return (float) (Math.asin(var30 / 2.0D) * 1.27420015798544E7D);
        } catch (Throwable var32) {
            var32.printStackTrace();
            return 0.0F;
        }
    }
}
